from subprocess import Popen, PIPE, run
import base64
from sys import stdout, stdin
import threading
from signal import pause
from interval import setInterval

def playLocal(file):
  cmd = ['mplayer', '-cache', '1024', file]
  run(cmd)

def playOpen():
  filePath = '/home/pi/dev/open.mp3'
  playLocal(filePath)

def playClose():
  filePath = '/home/pi/dev/close.mp3'
  playLocal(filePath)

def playAlert():
  filePath = '/home/pi/dev/alert.mp3'
  playLocal(filePath)

def playAccept():
  filePath = '/home/pi/dev/accept.mp3'
  playLocal(filePath)

def playDeny():
  filePath = '/home/pi/dev/deny.mp3'
  playLocal(filePath)

def playWarning():
  filePath = '/home/pi/dev/warning.mp3'
  playLocal(filePath)

def playError():
  filePath = '/home/pi/dev/error.mp3'
  playLocal(filePath)

def playReconnect():
  filePath = '/home/pi/dev/reconnect.mp3'
  playLocal(filePath)

def playQrDi():
  filePath = '/home/pi/dev/di.mp3'
  playLocal(filePath)

def playMp3(b64Mp3):
  # mp3 = base64.decodebytes(b64Mp3)
  # print(b64Mp3)
  mp3 = base64.standard_b64decode(b64Mp3)
  # stdout.buffer.write(mp3)
  cmd = ['mplayer', '-cache', '1024', '-']
  p = run(cmd, stdout=PIPE, input=mp3)
  # (output, _) = p.communicate(input=mp3)
  # return output

def repeatPlayMp3(b64Mp3):

  @setInterval(1)
  def loop():
    print('play mp3...')
    playMp3(b64Mp3)

  stopped = loop()
  return stopped

if __name__ == '__main__':
  b64Mp3 = '//tQxAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/7UMQAA0lMqRhnsGmRY5Wjg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Vm74aIpEoHBKlVWZG2gzCof/7UsR5A8n8twgNMSEJQJbgQaYkGQR6MzxGTWkp6CRGjYXhE642TrjEpa4Sljk0aNa1bQKq1UbGlkW7blPJS8SNa4USLa1USQCCjABwbiO4xWTMADC0fEtyoEVRyoOKAJDr0anCRdhuaxVRtlEQjQ0XQN5FEVGjgjQG3NR/+VebFZVNDt0Ve6p+5TCISCQTDguqrWo='
  # playMp3(b64Mp3)
  # threading._start_new_thread(playMp3, (b64Mp3, ))
  # stdin.read()
  # try:
  #   stop = repeatPlayMp3(b64Mp3)
  # except KeyboardInterrupt as identifier:
  #   stop.set()

  # while True:
  #   playMp3(b64Mp3)
  playAlert()
  stop = repeatPlayMp3(b64Mp3)
  stdin.read(1)
  stop.set()
  # playOpen()
  # playClose()
  # stdin.read(1)
